<div class="wrapper">
    <div>
        <div class="box box-top">
            <!-- /.box-header -->
            <!-- form start -->
            <form id="refundLogForm" role="form" action="${base}/admin/refundLog/save" method="post">
                <input type="hidden" name="payLogId" value="${(payLog.id?c)!}">
                <div class="box-body">

                            <div class="form-group">
                                <label for="riderName">骑手Name</label>
                                <input type="text" value="${(payLog.riderName)!}" class="form-control" name="riderName" id="riderName">
                            </div>

                            <div class="form-group">
                                <label for="phone">手机号码</label>
                                <input type="text" value="${(payLog.phone)!}" class="form-control" name="phone" id="phone">
                            </div>
                            <div class="form-group">
                                <label for="refundMoney">可退款金额</label>
                                <input type="text" value="${(payLog.payMoney?c)!}" disabled class="form-control" id="payMoney">
                            </div>
                            <div class="form-group">
                                <label for="refundMoney">退款金额</label>
                                <input type="text" value="" class="form-control" number required max="${payLog.payMoney?c}" name="refundMoney" id="refundMoney">
                            </div>
                            <div class="form-group">
                                <label for="memo">Note</label>
                                <input type="text" value="${(refundLog.memo)!}" class="form-control" name="memo" id="memo">
                            </div>

                    <div class="box-footer">
                        <button type="button" onclick="$('#refundLogForm').submit();" class="btn btn-primary">Save
                        </button>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
<script type="text/javascript">
    $(function() {
        $("#refundLogForm").validate({
            submitHandler:function(form){
                submitRefundLog();
            }
        });
    });
    function submitRefundLog(){
        HF.ajaxFormSubmit('refundLogForm',function(result){
            alert("Save Success");
            document.location.reload();
        },function(e){ alert("Save Failure");});
    }
</script>
